<?php 
$brand = isset($brand) ? $brand : 'tbk2012';
$nav = isset($nav) ? $nav : array();
$active = isset($active) ? $active : '';
?>

<div class="navbar navbar-inverse navbar-fixed-top" id='nav'>
  <div class="navbar-inner">
    <div class="container">
      <a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
      </a>
      <a class="brand" href="#"><?php echo $brand;?></a>
      <div class="nav-collapse collapse">
        <ul class="nav">
          <?php foreach ($nav as $k => $v):?>
          <li <?php if ($active == $v['name']) echo "class='active'";?>><a href="<?php echo $v['url'];?>"><?php echo $v['cname'];?></a></li>
          <?php endforeach;?>
        </ul>
      </div>
    </div>
  </div>
</div>
